<template>
  <List :comments="comments"/>
  <FormBox @up="phot"/>
</template>

<script setup>
import { ref } from 'vue'
import List from '@/pages/v2/CommentList.vue'
import FormBox from '@/pages/v2/FormBoxComponent.vue'

const comments = ref([
  {author:"物理",text:"vue组件化开发"},
  {author:"化学",text:"vue组件化开发"},
]);

function phot(text){
  this.comments.push({
    author:"牵引力",text:text
  })
}
</script>